#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

#include <QFileDialog>
#include <QFile>
#include <QMessageBox>
#include <qprocess.h>

#include <QButtonGroup>
#include <QCheckBox>
#include <QLineEdit>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

    void MainInitData();

private slots:
    void on_pushButtonPackGenerate_clicked();
    void Upackage_GroupAddFile(QAbstractButton *button);
    void Merge_GroupAddFile(QAbstractButton *button);
    void on_pushButtonParamGeneration_clicked();

    void on_pushButtonLcdParamOpen_clicked();

    void on_pushButtonClearParamLog_clicked();

    void on_pushButtonMerge_clicked();

private:
    Ui::MainWindow *ui;

    QString                 fileName[5];
    quint32                 fileAddr[5];
    QString                 mergeFileName[5];
    quint32                mergeFileAddr[5];
    quint8                   lcdParam;

    QButtonGroup        uFileGButton;
    QCheckBox           *checkBoxFile[5];
    QLineEdit               *lineEditAddr[5];
    QLineEdit               *lineEditFile[5];

    QButtonGroup        mergeGButton;
    QCheckBox           *checkBoxMerge[5];
    QLineEdit               *lineEditMergeAddr[5];
    QLineEdit               *lineEditMergeFile[5];
};
#endif // MAINWINDOW_H
